 begintownscript;
variables;
short choice,i;

body;
beginstate init_state;
i = 0;
while(char_ok(i) == 0){
	i = i + 1;
}
set_character_facing(i,6);
force_instant_terrain_redraw();
reset_dialog();
add_dialog_str(0,"I wandered the twisting streets of the waterfront aimlessly, hoping to somehow find a lead on Sly. Occasionally I'd stop a street vender and ask if he'd seen a man matching Sly's description-- usually I just got spat at for my efforts.",0);
add_dialog_str(1,"My chances of finding Sly were slim-- but if it were easy us bounty hunters wouldn't get paid like we do.",0);
add_dialog_choice(0,"OK");
choice = run_dialog(1);
set_name(8,"Sly");
set_name(27,"Sly");
break;

beginstate exit_state;
break;

beginstate start_state;
break;

beginstate 10;
if(get_flag(203,1) == 0){
	block_entry(1);
	message_dialog("It could take me a month to search the waterfront if I started wandering down every alley and side street. For the time being I decided to stick to the main roads.","");
}
else
	if(get_flag(203,2) == 0){
		set_flag(203,2,1);
		play_sound(163);
		message_dialog("I slowed down as I entered the alley, and pulled my invisibility cloak around myself. This was it.","I had had enough with trying to arrest Sly-- and the myriad of other thieves at the waterfront weren't likely to take kindly to seeing a bounty hunter hauling away one of their own. I would kill him and be done with the whole thing.");
	}
break;

beginstate 11;
block_entry(1);
message_dialog("I had already searched in that direction.","");
break;

beginstate 12;
if(get_flag(203,0) == 0){
	set_flag(203,0,1);
	message_dialog("The streets stank of fish and sweat. I waded through crowds of the greasy, slimy riffraff that inhabited the waterfronts, ever on the lookout for my quarry.","Suddenly I spotted him.");
	force_view_center(22,25);
	force_instant_terrain_redraw();
	pause(2);

	relocate_character(27,22,24);
	force_instant_terrain_redraw();
	pause(3);

	relocate_character(27,22,23);
	force_instant_terrain_redraw();
	pause(3);

	relocate_character(27,22,22);
	force_instant_terrain_redraw();
	pause(3);

	flip_terrain(22,21);
	erase_char(27);
	force_instant_terrain_redraw();
	pause(3);

	flip_terrain(22,21);
	force_instant_terrain_redraw();
	pause(3);

	message_dialog("I caught sight of him down the street, entering the Spray Inn. It's good to be good-- but sometimes it's better to be lucky.","I'd gotten lucky this time-- real lucky. I shoved through the crowd as I made my way towards the Spray.");
	force_view_center(char_loc_x(i),char_loc_y(i));
	force_instant_terrain_redraw();
}
break;

beginstate 13;
if(get_flag(203,1) == 0){
	set_flag(203,1,1);
	message_dialog("I pulled my hood low as I peaked inside the inn. I didn't want Sly to spook when he saw me-- but I didn't have to worry.","He was nowhere to be seen. I cursed. Where the hell could he have gone. He'd walked in less than a minute ago, and he definitely wasn't sitting at any of the tables.");
	message_dialog("There must be a back door. I stepped back outside-- there was an alley to the west, I sprinted towards it.","");
}
break;


beginstate 14;
message_dialog("I'd just spotted Sly, and he wasn't headed that way.","");
block_entry(1);
break;

beginstate 18;
	block_entry(1);
	message_dialog("It could take me a month to search the waterfront if I started wandering down every alley and side street. For the time being I decided to stick to the main roads.","");
break;

beginstate 19;
if(get_flag(203,4) == 0){
	block_entry(1);
	set_flag(203,4,1);
	reset_dialog();
	add_dialog_str(0,"There he was. He was standing with his back to me, and seemed to be engaged in some sort of dispute with two other men I'd never seen before. One wore tattered blue robes, the other dark blue armor with a blue flag emblem on his chest.",0);
	add_dialog_str(1,"Sly had his back to me and was distracted by the argument. It would be an easy matter to slay him and make my escape-- this had turned out fairly well, if he'd stayed in the inn I'd have had to kill him in front of all those people.",0);
	add_dialog_str(2,"Though living in Cigosal probably had them used to public murders...",0);
	add_dialog_choice(0,"OK");
	choice = run_dialog(1);
	relocate_character(i,15,8);
	force_view_center(15,8);
	set_character_facing(i,6);
	force_instant_terrain_redraw();
	pause(2);

	put_sparkles_on_char(i,11,10);
	run_animation_sound(163);
	pause(2);

	set_character_pose(i,1);
	force_instant_terrain_redraw();
	pause(2);

	play_sound(69);
	pause(1);

	message_dialog("For some reason my sword didn't meet the resistance of leather and flesh-- it just whistled through the air harmlessly.","Sly had dove forward to avoid the stroke. He hadn't even turned around to see that I was there; he must have had eyes in the back of his head-- or just the best luck in the world.");
	message_dialog("My sword whistled inches past his head, and continued on to clang against the breastplate of the man next to him. Sly's dive had spared his life, but he was now defenseless. Unfortunately I didn't have an opportunity to strike while he was down.","The blue armored man hadn't taken kindly to being struck. He rounded upon me and swung his halberd in a deadly arc. I was forced to roll away to avoid being clove in two. First he would have to be dealt with.");
	set_character_pose(i,0);
	force_instant_terrain_redraw();
	pause(2);
	erase_char(7);
	erase_char(8);
	set_attitude(6,10);
}
break;

beginstate 20;
if(get_flag(203,4) == 1){
	block_entry(1);
	message_dialog("I had a fight on my hands.","");
}
break;

beginstate 21;
reset_dialog();
add_dialog_str(0,"The blue armored man fell dead. I wasn't familiar with the blue flag that adorned his armor, but whatever faction he belonged to they'd taught him how to fight. Defeating him had consumed all my attention.",0);
add_dialog_str(1,"Sly and the robed man had disappeared while I was distracted. They were nowhere in sight. I was sure that I hadn't seen them run past me-- I would have noticed that-- and I hadn't seen them reenter the inn either.",0);
add_dialog_str(2,"Yet there was no other place they could have gone.",0);
add_dialog_str(3,"Frustrating. Sly had somehow managed to escape me again. The man was like a greased pig-- no matter how firmly in your grasp he could always somehow slip away.",0);
add_dialog_choice(0,"OK");
choice = run_dialog(1);
set_flag(203,4,2);
break;

beginstate 22;
if(get_flag(203,4) == 2)
	move_to_new_town(24,16,1);
	//move_to_new_town(4,16,1);
break;

beginstate 100;
block_entry(1);
break;